# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kfind
pkgver=20.04.3
pkgrel=0
arch="all !armhf" # armhf blocked by extra-cmake-modules
url="https://www.kde.org/applications/utilities/kfind"
pkgdesc="Find Files/Folders"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="extra-cmake-modules karchive-dev kcoreaddons-dev kdoctools-dev kfilemetadata-dev ki18n-dev kio-dev ktextwidgets-dev kwidgetsaddons-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/kfind-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # No tests

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="cedc192ad1247131a2f708c4ff1266636c57eaf60e46b58f2b5eb9aded61aca63ddbdca936ff8cdc216891569e7c2aca9cf61371f93468df1bca799f8df3117a  kfind-20.04.3.tar.xz"
